/* jshint indent: 1 */

module.exports = function(sequelize, DataTypes) {
	return sequelize.define('setups', {
		id: {
			type: DataTypes.INTEGER(11),
			allowNull: false,
			primaryKey: true,
			autoIncrement: true,
			field: 'id'
		},
		name: {
			type: DataTypes.STRING(30),
			allowNull: false,
			defaultValue: '',
			field: 'name'
		},
		title: {
			type: DataTypes.STRING(50),
			allowNull: false,
			defaultValue: '',
			field: 'title'
		},
		brief: {
			type: DataTypes.STRING(255),
			allowNull: false,
			field: 'brief'
		},
		remark: {
			type: DataTypes.STRING(255),
			allowNull: false,
			field: 'remark'
		},
		extra: {
			type: DataTypes.STRING(255),
			allowNull: false,
			defaultValue: '',
			field: 'extra'
		},
		type: {
			type: DataTypes.INTEGER(1).UNSIGNED,
			allowNull: false,
			defaultValue: '0',
			field: 'type'
		},
		status: {
			type: DataTypes.INTEGER(1),
			allowNull: false,
			defaultValue: '0',
			field: 'status'
		},
		group: {
			type: DataTypes.INTEGER(1).UNSIGNED,
			allowNull: false,
			defaultValue: '0',
			field: 'group'
		},
		sort: {
			type: DataTypes.INTEGER(1).UNSIGNED,
			allowNull: false,
			defaultValue: '0',
			field: 'sort'
		},
		createdAt: {
			type: DataTypes.DATE,
			allowNull: false,
			field: 'createdAt'
		},
		updatedAt: {
			type: DataTypes.DATE,
			allowNull: false,
			field: 'updatedAt'
		},
		deletedAt: {
			type: DataTypes.DATE,
			allowNull: true,
			field: 'deletedAt'
		}
	}, {
		tableName: 'Setups'
	});
};
